<admintpl file="header" />

<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:U('SiteVisa/index')}">现场签证流程单管理</a></li>
            <li class="active"><a href="{:U('SiteVisa/add')}">新增现场签 证流程单</a></li>
        </ul> 
        <section class="tab-pane active fade in" id="access">
            <div class="row">
                <div class="col-xs-12 col-md-12 col-lg-12">
                    <div class="panel panel-info">
                        <div class="panel-body">
                            <form method="post" class="form-horizontal form-inline tg" action="{:U('SiteVisa/add_post')}" method="post">
                                <input type="hidden" name="audit_level" value="2" >                           
                                <div class="row tg-header">
                                    <div class="col-md-12 text-center">
                                        <h3>现场签证流程单</h3>
                                    </div>
                                    <div class="col-md-12">
                                        <p class="tg-to">
                                            <label>工程名称:</label><input type="text" class="input-xt"  disabled value="{$job_name}" readonly/>
                                        </p>
                                        <p class="tg-to" style="margin-left: 100px">
                                            <label>所属合同（联系单）:</label>
                                            <input type="text" name="contract" class="input-xt" value="" required/>
                                        </p>
                                        <p class="pull-right tg-serialnum">
                                            <label>编号:</label>
                                            <input class="input-xt" name="code" type="text"  required/>
                                        </p>
                                    </div>
                                </div>
                                <table class="table table-bordered">
                                    <tr>
                                        <td style="border-right:none !important;" colspan="2">
                                            <label>事项名称:</label>
                                        </td>
                                        <td colspan="3">
                                            <input type="text" name="consignee_department" class="input-xt input-deptname" style="border:none !important;" required />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <label>适用范围:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="applicability" class="input-xt input-deptname" style="border:none !important;" required />
                                        </td>
                                        <td>
                                            <label>提出日期:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="submission_date" class="js-date input-xt input-deptname" style="border:none !important;" required value="<php>echo date('Y-m-d');</php>"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <label>签证原因:</label>
                                        </td>
                                        <td colspan="3">
                                            <input type="text" name="reasons" class="input-xt input-deptname" style="border:none !important;" required />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td-center">
                                            <label>
                                                <p>签</p>
                                                <p>证</p>
                                                <p>内</p>
                                                <p>容:</p>
                                            </label>
                                        </td>
                                        <td colspan="4">
                                            <textarea name="main_content" style="height:100px; width:100%"></textarea>
                                            <p>
                                                <label>附件：</label>
                                                <div class="controls">
                                                    <a class="btn upBtn btn-primary" href="javascript:void(0);">上传</a>
                                                    <input type="file" id="upFile" name="upFile" style="display:none" />
                                                </div>
                                            </p>  
                                            <span style="float: left ;">经办人</span>

                                            <div style="float: right; margin-right: 280px">
                                                <p>项目负责人：</p>
                                                <p>施工单位（盖章）：</p>
                                                <p>
		                                            <input type="text" class="js-date input-xt input-date" name="publish_time" value="<php>echo date('Y-m-d');</php>" required />
		                                        </p>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                                <p class="text-muted tg-note">
                                    <small>备注：本表一式5份，发包人项目部一份（原件），承包人二份（原件含备案）、代建监理各一份（原件）</small>
                                </p>
                                <div class="form-actions">
                                    <button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
                                    <a class="btn btn-default" href="javascript:history.back(-1);">{:L('BACK')}</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
        $(document).ready(function(e) {
            window.obj = '';
            // 选择图片
            $(document).on("click", ".upBtn", function(e) {
                window.obj = $(this);
                $("#upFile").click();
            });

            // 文件选择器change事件
            $("#upFile").on("change", function(){
                UploadFile("{:U('SiteVisa/upload')}", "site_visa");
            });
            $(document).on("click", ".delFile", function(){
                if($(this).attr("value") != undefined){
                    delFile("{:U('SiteVisa/delFile')}", $(this).attr("value"), $(this))
                } else {
                    $(this).closest("div").remove();
                }
            });
        });
    </script>
</body>
</html>